package cn.elead.it.sso.core.constant;

/**
 * 全局常量
 * 
 * @author luopeng
 *
 */
public interface GlobalVariable {

	/**
	 * 主题
	 */
	String THEME = "lanse/";
	
	/**
	 * sso sessionid, between browser and sso-server (web + token client)
	 */
	String SSO_SESSIONID = "sso_sessionid";
	
	/**
	 * sso clientId, between browser and sso-server (web + token client)
	 */
	String SSO_CLIENTID = "clientId";
	
	/**
	 * sso clientSecret, between browser and sso-server (web + token client)
	 */
	String SSO_CLIENTSECRET = "clientSecret";

	/**
	 * redirect url (web client)
	 */
	String REDIRECT_URI = "redirect_uri";
	
	/**
	 * client_id (web client)
	 */
	String CLIENT_ID = "client_id";

	/**
	 * sso user, request attribute (web client)
	 */
	String SSO_USER = "sso_user";

	/**
	 * sso server address (web + token client)
	 */
	String SSO_SERVER = "sso_server";

	/**
	 * 重定向标识
	 */
	String REDIRECT_URI_PREFIX = "redirect:";
	
	/**
	 * OAUTH code模式
	 */
	String OAUTH_CODE_RESPONSE_TYPE = "code";

	/**
	 * OAUTH token模式
	 */
	String OAUTH_TOKEN_RESPONSE_TYPE = "token";
	
	/**
	 * OAUTH state
	 */
	String OAUTH_STATE_KEY = "state";

	/**
	 * login url, server relative path (web client)
	 */
	String SSO_LOGIN = "/login";
	/**
	 * logout url, server relative path (web client)
	 */
	String SSO_LOGOUT = "/logout";

	/**
	 * logout path, client relatice path
	 */
	String SSO_LOGOUT_PATH = "SSO_LOGOUT_PATH";

	/**
	 * excluded paths, client relatice path, include path can be set by
	 * "filter-mapping"
	 */
	String SSO_EXCLUDED_PATHS = "SSO_EXCLUDED_PATHS";
	
	/**
	 * oauth回调,通过code获取token
	 */
	String SSO_CODE_CALLBACK = "codeCallback";

	/**
	 * 默认登录页面
	 */
	String DEFAULT_LOGIN_PAGE_PATH = "login";
	
	/**
	 * 默认错误信页面
	 */
	String DEFAULT_ERROR_PAGE_PATH = "error";
	
	/**
	 * 单点客户端信息
	 */
	String DEFAULT_LOGIN_PAGE_CLIENT_INFO_KEY = "oauthClient";
	

}
